<%- if devise_mapping.omniauthable? && %w{ registrations sessions }.include?(controller_name) %>
  <div>
    <%- resource_class.omniauth_providers.each do |provider| %>
      <%= button_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(:user, provider), class: "btn btn-#{provider} w-full", data: { turbo: false, disable_with: t(".redirecting") } %>
    <% end -%>

    <div class="mt-6 text-sm text-gray-300">
      <details class="group">
        <summary class="flex items-center gap-2 cursor-pointer">
          <svg class="w-4 h-4 group-open:rotate-90 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
          </svg>
          Why are so many permissions required on Github? (We think it sucks too!)
        </summary>
        <div class="mt-2 pl-6">
          <div class="rounded-lg space-y-4">
            <p>Canine <a class="underline" target="_blank" href="http://docs.canine.sh/docs/technical-details/canine-architecture">uses Github container registry to store containers</a>.</p>
            <p>Github only allows <a class="underline" target="_blank" href="https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry">OAuth tokens to be used for uploading to packages</a>.</p>
            <p>If you don't want to provide OAuth permissions, you can sign up with an email and password.</p>
          </div>
        </div>
      </details>
    </div>
  </div>
<% end -%>

<%- if devise_mapping.recoverable? && controller_name != "passwords" && controller_name != "registrations" %>
  <%= link_to t(".forgot_your_password"), new_password_path(resource_name), class: "block text-sm font-semibold mt-2" %>
<% end -%>

<%- if devise_mapping.confirmable? && controller_name != "confirmations" %>
  <%= link_to t(".didn_t_receive_confirmation_instructions"), new_confirmation_path(resource_name), class: "block text-sm font-semibold mt-2" %>
<% end -%>

<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != "unlocks" %>
  <%= link_to t(".didn_t_receive_unlock_instructions"), new_unlock_path(resource_name), class: "block text-sm font-semibold mt-2" %>
<% end -%>
